.hzdz-bar-chart {
  position: relative;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  width: 500px;

  // 深色主题
  &--dark {
    background: transparent;
    border: none;
    box-shadow: none;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: transparent;
      pointer-events: none;
      z-index: 1;
    }

    // 图表容器
    > div {
      position: relative;
      z-index: 2;
    }
  }

  // 浅色主题
  &--light {
    background: transparent;
    border: none;
    box-shadow: none;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: transparent;
      pointer-events: none;
      z-index: 1;
    }

    // 图表容器
    > div {
      position: relative;
      z-index: 2;
    }
  }

  // 加载动画
  &.loading {
    &::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 40px;
      height: 40px;
      margin: -20px 0 0 -20px;
      border: 3px solid rgba(0, 212, 255, 0.3);
      border-top: 3px solid #00d4ff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      z-index: 10;
    }
  }

  // 悬停效果
  &:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;

    &.hzdz-bar-chart--dark {
      box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
      border-color: rgba(0, 212, 255, 0.4);
    }

    &.hzdz-bar-chart--light {
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
  }

  // 网格线增强
  .echarts-grid {
    .echarts-axis-line {
      stroke-width: 1;
    }

    .echarts-split-line {
      stroke-dasharray: 5,5;
    }
  }

  // 自定义滚动条（如果需要）
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;

    &:hover {
      background: rgba(0, 212, 255, 0.5);
    }
  }

  // 响应式处理
  @media (max-width: 768px) {
    border-radius: 4px;

    &:hover {
      transform: none;
    }
  }

  @media (max-width: 480px) {
    margin: 0 -8px;
    border-radius: 0;
  }
}

// 加载动画关键帧
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

// 图表进入动画
@keyframes chartFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hzdz-bar-chart > div {
  animation: chartFadeIn 0.8s ease-out;
}

// 柱状图特殊样式增强（可选）
.hzdz-bar-chart {
  // 添加一些微光效果（可选）
  &--dark::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
      45deg,
      transparent,
      rgba(0, 212, 255, 0.1),
      transparent,
      rgba(26, 215, 255, 0.1),
      transparent
    );
    background-size: 400% 400%;
    animation: shimmer 3s ease-in-out infinite;
    border-radius: 10px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  &--dark:hover::after {
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
